module eSPI_intel  (  /*autoarg*/
   // Outputs
   w_post_code, txd, espi_alert_n,
   // Inouts
   espi_io,
   // Inputs
   sys_rst_n, sys_clk, rxd, espi_reset_n, espi_cs_n, espi_clk
   ) ;


inout   [7:0]      espi_io ;

/*autoinout*/


/*autoinput*/
// Beginning of automatic inputs (from unused autoinst inputs)
input			espi_clk;		// To u_eSPI_slave of espi_slave.v
input			espi_cs_n;		// To u_eSPI_slave of espi_slave.v
input			espi_reset_n;		// To u_eSPI_slave of espi_slave.v
input			rxd;			// To u_uart of uart.v
input			sys_clk;		// To u_eSPI_slave of espi_slave.v
input			sys_rst_n;		// To u_eSPI_slave of espi_slave.v
// End of automatics

/*autooutput*/
// Beginning of automatic outputs (from unused autoinst outputs)
output logic		espi_alert_n;		// From u_eSPI_slave of espi_slave.v
output			txd;			// From u_uart of uart.v
output [7:0]		w_post_code;		// From u_intel_espi2uart of intel_espi2uart.v
// End of automatics


/*autowire*/
// Beginning of automatic wires (for undeclared instantiated-module outputs)
logic [15:0]		io_address;		// From u_eSPI_slave of espi_slave.v
logic			io_read;		// From u_eSPI_slave of espi_slave.v
logic			io_reset;		// From u_eSPI_slave of espi_slave.v
logic			io_write;		// From u_eSPI_slave of espi_slave.v
logic [7:0]		io_writedata;		// From u_eSPI_slave of espi_slave.v
wire [7:0]		rx_data;		// From u_uart of uart.v
wire			rx_err;			// From u_uart of uart.v
wire			rx_vld;			// From u_uart of uart.v
wire [7:0]		tx_data;		// From u_intel_espi2uart of intel_espi2uart.v
wire			tx_en;			// From u_intel_espi2uart of intel_espi2uart.v
wire			tx_rdy;			// From u_uart of uart.v
// End of automatics



wire    [3:0]   espi_data_out ;
wire    [3:0]   espi_data_in  ;


    assign espi_io      = espi_reset_n ? espi_data_out : 4'bzzzz;
    assign espi_data_in = espi_io;





intel_espi2uart u_intel_espi2uart(
			 .clk			(sys_clk     ),
			 .rst 		        (~sys_rst_n   ),
/*autoinst*/
				  // Outputs
				  .tx_en		(tx_en),
				  .tx_data		(tx_data[7:0]),
				  .w_post_code		(w_post_code[7:0]),
				  // Inputs
				  .tx_rdy		(tx_rdy),
				  .rx_vld		(rx_vld),
				  .rx_data		(rx_data[7:0]),
				  .rx_err		(rx_err),
				  .io_reset		(io_reset),
				  .io_address		(io_address[15:0]),
				  .io_write		(io_write),
				  .io_read		(io_read),
				  .io_writedata		(io_writedata[7:0]));


  /* espi_slave  AUTO_TEMPLATE "\([0-9]+\)"  (
                         .avmm_readdata		( ),
			 .avmm_readdatavalid	( ),
			 .mem_reset		( ),
			 .mem_address		( ),
			 .mem_write		( )       ,
			 .mem_writedata		( ),
			 .mem_byteenable	( ),
			 .mem_read		( ),
			 .irq			( ),
			 .oob_rxfifo_avail	( ),
			 .vw_plto		( ),
			 .vw_gpo		( ),
			 .slp_s3_n		( ),
			 .slp_s4_n		( ),
			 .slp_s5_n		( ),
			 .sus_stat_n		( ),
			 .pltrst_n		( ),
			 .oob_rst_warn		( ),
			 .host_rst_warn		( ),
			 .smiout_n		( ),
			 .nmiout_n		( ),
			 .device_id_reg		( ),
			 .general_config_reg	( ),
			 .channel0_config_reg	( ),
			 .channel1_config_reg	( ),
			 .channel2_config_reg	( ),
			 .channel3_config_reg	( ),

			 .clk			(sys_clk     ),
			 .reset_n		(sys_rst_n   ),
			 
			 .avmm_write		('d0 ),
			 .avmm_read		('d0 ),
			 .avmm_writedata	('d0 ),
			 .avmm_address		('d0 ),
			 .mem_readdata		('d0 ),
			 .mem_waitrequest	('d0 ),
			 .io_readdata		('d0 ),
			 .io_waitrequest	('d0 ),

			 .vw_irq		('d0 ),
			 .vw_plti		('d0 ),
			 .vw_gpi		('d0 ),
			 .slave_boot_load_done	('d0),
			 .slave_boot_load_status('d0),
			 .oob_rst_ack		('d0),
			 .wake_n		(1),
			 .nmi_n			(1),
			 .pme_n			(1),
			 .sci_n			(1),
			 .smi_n			(1),
			 .rcin_n		(1),
			 .host_rst_ack		(0),
			 .rsmrst_n		(1),
			 .error_nonfatal	(0),
			 .error_fatal		(1),
);
*/




espi_slave  u_eSPI_slave(
/*autoinst*/
			 // Outputs
			 .avmm_readdata		( ),		 // Templated
			 .avmm_readdatavalid	( ),		 // Templated
			 .mem_reset		( ),		 // Templated
			 .mem_address		( ),		 // Templated
			 .mem_write		( ),		 // Templated
			 .mem_writedata		( ),		 // Templated
			 .mem_byteenable	( ),		 // Templated
			 .mem_read		( ),		 // Templated
			 .io_reset		(io_reset),
			 .io_address		(io_address[15:0]),
			 .io_write		(io_write),
			 .io_writedata		(io_writedata[7:0]),
			 .io_read		(io_read),
			 .irq			( ),		 // Templated
			 .oob_rxfifo_avail	( ),		 // Templated
			 .espi_data_out		(espi_data_out[3:0]),
			 .espi_alert_n		(espi_alert_n),
			 .vw_plto		( ),		 // Templated
			 .vw_gpo		( ),		 // Templated
			 .slp_s3_n		( ),		 // Templated
			 .slp_s4_n		( ),		 // Templated
			 .slp_s5_n		( ),		 // Templated
			 .sus_stat_n		( ),		 // Templated
			 .pltrst_n		( ),		 // Templated
			 .oob_rst_warn		( ),		 // Templated
			 .host_rst_warn		( ),		 // Templated
			 .smiout_n		( ),		 // Templated
			 .nmiout_n		( ),		 // Templated
			 .device_id_reg		( ),		 // Templated
			 .general_config_reg	( ),		 // Templated
			 .channel0_config_reg	( ),		 // Templated
			 .channel1_config_reg	( ),		 // Templated
			 .channel2_config_reg	( ),		 // Templated
			 .channel3_config_reg	( ),		 // Templated
			 // Inputs
			 .clk			(sys_clk     ),	 // Templated
			 .reset_n		(sys_rst_n   ),	 // Templated
			 .avmm_write		('d0 ),		 // Templated
			 .avmm_read		('d0 ),		 // Templated
			 .avmm_writedata	('d0 ),		 // Templated
			 .avmm_address		('d0 ),		 // Templated
			 .mem_readdata		('d0 ),		 // Templated
			 .mem_waitrequest	('d0 ),		 // Templated
			 .io_readdata		('d0 ),		 // Templated
			 .io_waitrequest	('d0 ),		 // Templated
			 .espi_clk		(espi_clk),
			 .espi_reset_n		(espi_reset_n),
			 .espi_cs_n		(espi_cs_n),
			 .espi_data_in		(espi_data_in[3:0]),
			 .vw_irq		('d0 ),		 // Templated
			 .vw_plti		('d0 ),		 // Templated
			 .vw_gpi		('d0 ),		 // Templated
			 .slave_boot_load_done	('d0),		 // Templated
			 .slave_boot_load_status('d0),		 // Templated
			 .oob_rst_ack		('d0),		 // Templated
			 .wake_n		(1),		 // Templated
			 .nmi_n			(1),		 // Templated
			 .pme_n			(1),		 // Templated
			 .sci_n			(1),		 // Templated
			 .smi_n			(1),		 // Templated
			 .rcin_n		(1),		 // Templated
			 .host_rst_ack		(1),		 // Templated
			 .rsmrst_n		(1),		 // Templated
			 .error_nonfatal	(0),		 // Templated
			 .error_fatal		(1));		 // Templated





uart  u_uart(
             .rst_n			( sys_rst_n  ),
	     .clk		(sys_clk ),
	     /*autoinst*/
	     // Outputs
	     .tx_rdy			(tx_rdy),
	     .rx_vld			(rx_vld),
	     .rx_data			(rx_data[7:0]),
	     .rx_err			(rx_err),
	     .txd			(txd),
	     // Inputs
	     .tx_en			(tx_en),
	     .tx_data			(tx_data[7:0]),
	     .rxd			(rxd));

endmodule


// Local Variables:
// verilog-auto-inst-param-value:t
// verilog-library-directories:("." "./espi_slave"    )
// End:



